<?php
namespace App\Service\Item\Fxotary;

use App\Service\BaseService as Service;
use Illuminate\Support\Facades\DB;

class BaseService extends Service
{
    //基础服务

    //////////////////////////////
    protected $xmMenu = 'tmp_menu'; //模板菜单
    protected $xmUser = 'tmp_user'; //模板用户
    protected $xmData = 'tmp_data'; //模板数据
    ///////////////////////////////
//    protected $xmMenu = 'xm_menu';
//    protected $xmUser = 'xm_user';
//    protected $xmData = 'xm_data';

    //通过token获取uid
    public function uidByToken($token)
    {
        $res = (array) $this->dbConn($this->dbUlog)->where('token', $token)->first();
        return empty($res) ? $res['uid'] : 0;
    }
}